<template>
	<div class="nav_header">
		<div class="nav_header_left">饼干</div>



<el-dropdown @command="handleCommand" trigger="click" class="nav_header_right">
      <span class="el-dropdown-link">
        	您好，{{username}}<i class="el-icon-arrow-down el-icon--right"></i>
      </span>
      <el-dropdown-menu slot="dropdown">
        <el-dropdown-item command="e">退出</el-dropdown-item>
      </el-dropdown-menu>
    </el-dropdown>


	</div>
</template>
<style>
.nav_header{
}
.nav_header_left{
height:80px;
line-height:80px;
float:left;
}
.nav_header_right{
cursor:pointer;
padding-top:30px;
float:right;
}

</style>
<script>

	export default{
		data:function(){
			return {
				username:this.$cookieStore.getCookie("username"),
			}
		},methods:{
			handleCommand:function(command) {
				console.log("exit");
				var that=this;
				that.$cookieStore.delCookie("username");
				that.$router.push({path:'/Login'});
			},

		}
	}

</script>
